﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZHDJ.Data.Models.Edu;

namespace ZHDJ.Data.Mapping.Edu
{
    public class PartyEduSpecialMap:EntityTypeConfiguration<PartyEduSpecial>
    {
        public PartyEduSpecialMap()
        {
            //this.ToTable("tblPatyEduSpecial");
            //this.HasKey(fg => fg.ID);
            //this.Property(fg => fg.Name).IsRequired().HasMaxLength(200);
            this.HasOptional(a => a.CreateUser)
              .WithMany()
              .HasForeignKey(a => a.CreateBy).WillCascadeOnDelete(false);
            this.HasOptional(a => a.ModifyUser)
              .WithMany()
              .HasForeignKey(a => a.ModifyBy).WillCascadeOnDelete(false);
        }
    }
}
